package pri.jz.keeper.util

import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit

/**
 *Author by: JZ
 *Email: 2451756617@qq.com
 *PS: 线程工具
 */
object ThreadUtil {
    val cacheThreadPool = ThreadPoolExecutor( //缓冲线程，异步任务
        3,10,10,TimeUnit.MINUTES,LinkedBlockingQueue()
    )
    val singleThreadPool = ThreadPoolExecutor(//单个线程，用于同步任务
        1,1,1,TimeUnit.MINUTES,LinkedBlockingQueue()
    )
}